{% extends "site_base.html" %}
{% load url from future %}

{% block head_title %}Login{% endblock %}
{% block body%}


{% if not user.is_authenticated %}
{% if form.errors %}
<p>Your username and password didn't match. Please try again.</p>
{% endif %}

<form method="post" action="{% url 'django.contrib.auth.views.login' %}">
{% csrf_token %}
<table>
<tr>
    <td>{{ form.username.label_tag }}</td>
    <td>{{ form.username }}</td>
</tr>
<tr>
    <td>{{ form.password.label_tag }}</td>
    <td>{{ form.password }}</td>
</tr>
</table>

<input type="submit" value="login" />
<input type="hidden" name="next" value="{{ next }}" />
</form>

<p>If you don't have an account yet please <a href="/account/signup/">sign up</a> for a <b>{{site_name}}</b> account</p>

{% endif %}


{% if user.is_authenticated %}
<p> already logged in </p>
{% endif %}

{% endblock %}